<nz-modal [(nzVisible)]="isVisible" [nzWidth]="modalWidth" (nzOnCancel)="onBack()" [nzStyle]="{'top': '50px'}">
  <div *nzModalTitle>{{ title }}</div>
  <ng-container *nzModalContent>
    <form nz-form class="search-form" [formGroup]="searchForm" (keydown.enter)="$event.preventDefault();onSearch()" nzLayout="inline">
            <nz-form-item>
        <nz-form-label nzFor="enterpriseName">企业名称</nz-form-label>
        <nz-form-control>
          <nz-input-group nzSearch [nzAddOnAfter]="enterpriseNameSuffixIconButton">
            <input nz-input formControlName="enterpriseName" placeholder="请选择企业名称" readonly />
          </nz-input-group>
          <ng-template #enterpriseNameSuffixIconButton>
            <button nz-button nzType="primary" nzSearch (click)="findEnterprise()"><nz-icon nzType="search" /></button>
          </ng-template>
        </nz-form-control>
      </nz-form-item>
<nz-form-item>
        <nz-form-label nzFor="employeeNumber">工号</nz-form-label>
        <nz-form-control>
          <input nz-input formControlName="employeeNumber" placeholder="请输入工号" />
        </nz-form-control>
      </nz-form-item>
<nz-form-item>
        <nz-form-label nzFor="name">姓名</nz-form-label>
        <nz-form-control>
          <input nz-input formControlName="name" placeholder="请输入姓名" />
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label nzFor="departmentName">部门名称</nz-form-label>
        <nz-form-control>
          <nz-input-group nzSearch [nzAddOnAfter]="departmentNameSuffixIconButton">
            <input nz-input formControlName="departmentName" placeholder="请选择部门名称" readonly />
          </nz-input-group>
          <ng-template #departmentNameSuffixIconButton>
            <button nz-button nzType="primary" nzSearch (click)="findDepartment()"><nz-icon nzType="search" /></button>
          </ng-template>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label nzFor="positionName">岗位名称</nz-form-label>
        <nz-form-control>
          <nz-input-group nzSearch [nzAddOnAfter]="positionNameSuffixIconButton">
            <input nz-input formControlName="positionName" placeholder="请选择岗位名称" readonly />
          </nz-input-group>
          <ng-template #positionNameSuffixIconButton>
            <button nz-button nzType="primary" nzSearch (click)="findPosition()"><nz-icon nzType="search" /></button>
          </ng-template>
        </nz-form-control>
      </nz-form-item>
      <button nz-button type="button" nzType="primary" [nzLoading]="searchLoading" (click)="onSearch()">查询</button>
      <button nz-button type="button" class="margin-button" (click)="onReset()">重置</button>
    </form>
    <nz-table #basicTable [nzData]="listOfData" [nzTotal]="total" [nzLoading]="searchLoading" nzSize="small">
      <thead>
        <tr>
          <th>企业名称</th>
          <th>工号</th>
          <th>姓名</th>
          <th>密码</th>
          <th>性别</th>
          <th>出生日期</th>
          <th>联系电话</th>
          <th>邮箱</th>
          <th>省</th>
          <th>市</th>
          <th>区</th>
          <th>家庭地址</th>
          <th>聘用日期</th>
          <th>部门名称</th>
          <th>岗位名称</th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor="let data of basicTable.data" (dblclick)="onRowDblClick(data, $event)">
          <td>{{data.enterpriseName}}</td>
          <td>{{data.employeeNumber}}</td>
          <td>{{data.name}}</td>
          <td>{{data.password}}</td>
          <td>
            <ng-container *ngIf="data.gender === 1">男</ng-container>
            <ng-container *ngIf="data.gender === 2">女</ng-container>
          </td>
          <td>{{data.birthDate}}</td>
          <td>{{data.contactPhone}}</td>
          <td>{{data.email}}</td>
          <td>{{data.province}}</td>
          <td>{{data.city}}</td>
          <td>{{data.area}}</td>
          <td>{{data.address}}</td>
          <td>{{data.hireDate}}</td>
          <td>{{data.departmentName}}</td>
          <td>{{data.positionName}}</td>
        </tr>
      </tbody>
    </nz-table>
  </ng-container>
  <div *nzModalFooter>
    <div class="form-button-container">
      <button nz-button nzType="default" (click)="onBack()">关闭</button>
    </div>
  </div>
</nz-modal>
<enterprise-selector (enterpriseSelectedEvent)="handleEnterpriseSelectedEvent($event)"></enterprise-selector>
<department-selector (departmentSelectedEvent)="handleDepartmentSelectedEvent($event)"></department-selector>
<position-selector (positionSelectedEvent)="handlePositionSelectedEvent($event)"></position-selector>
